import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author wq3stone
 */
public class Page3Servlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        int num1 = (Integer) req.getSession().getAttribute("num1");
        int num2 = (Integer) req.getSession().getAttribute("num2");
        int sum = num1 + num2;
        resp.getWriter().print(num1 + "+" + num2 + "=" + sum);
    }
}
